<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>法援宝</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <link rel="stylesheet" type="text/css" href="../css/lawyer.css" />
    <script type="text/javascript" src="../script/api.js"></script>
    <script type="text/javascript" src="../script/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="../script/mobile.js"></script>
    <script type="text/javascript" src="../script/lawyer.js"></script>
</head>
<body>
<div id="secHeader">
  <header class="header">
      <a href="javascript:void(0);" onclick="comeBack()" class="back_btn"><img src="../image/head-fanhui.png" alt=""></a>
      <h2>我的回答</h2>

  </header>
</div>

<section class="ask_square">
    <div class="ask_list">
        <ul id='con'>
            <!-- <li>
                <a href="javascript:;" onclick="aaplay('index','ask_details.html')">
                    <div class="userInfo">
                        <img src="../image/userimg1.jpg" alt="">
                        <div class="userName">
                            <h6>135****7574</h6>
                            <span>重庆 重庆市 <em>5小时前</em></span>
                        </div>
                    </div>
                    <div class="comment_info">
                        <p>我转租了一个门面，签合同的时候说明里面东西都归我，现在有人来说机器是他的，要求我归还，我是不是可以不给他？</p>
                    </div>
                    <div class="ask_kinds">
                        <span>合同纠纷</span>
                        <div class="ask_active">
                            <em class="answer_num">4人回答</em>
                            <p>我来回答</p>
                        </div>
                    </div>
                </a>
            </li> -->

        </ul>
    </div>
</section>


</body>

<script>
    var page=1;

    apiready = function () {
      $api.fixStatusBar( $api.dom('#secHeader') );
      api.setStatusBarStyle({
          style: 'light'
      });
        
        api. addEventListener({name:'scrolltobottom'}, function(ret, err){

            toDoRequest();

        });

        toDoRequest();

    };

    function toDoRequest(){
        var p={uid:uid,page:page}

        api.ajax({
                url: webSiteUrl+'/app/public/fanswer',
                method: 'post',
                data: {
                    values: p
                }
            }, function(ret, err) {
                api.hideProgress();

                if(ret.code==200){

                    html = "";
                    var tj=ret.data;
                    if(tj != null){

                    for(var i=0;i<tj.length;i++){
html+='<li onclick="askdetail('+tj[i].tid+')"><div class="userInfo"><img src="'+webSiteUrl+tj[i].icon+'" alt=""><div class="userName"><h6>'+tj[i].nickname+'律师</h6><span>'+tj[i].time+'</span></div></div><div class="ask_title"><h6>'+tj[i].phone+'</h6><p>'+tj[i].content+'</p><span>'+tj[i].ajtype+'</span></div><div class="ask_info"><span>我的回复：</span>'+tj[i].reply+'</div></li>';
}
                    }
                    if(page==1){
                        $('#con').html(html);
                    }else{
                        $('#con').append(html);
                    }
                    page++;


                }else{
                    if(page==1){
                        $('#con').html('<p style="text-align:center">暂无数据</p>');
                    }

                }
            });

    }





</script>
</html>
